package com.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author xiongmin
 * @version 1.0
 * @date 20-8-20 下午3:23
 */

@Controller
public class HelloController {
    @GetMapping("touser")
    public String toUser(Model m) {
        m.addAttribute("username", "xiongmin");
        return "user";
    }

    @GetMapping("t2")
    public String toUser2(Model m) {
        m.addAttribute("title", "黑马无疆");
        return "2";
    }
}
